<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>mtlb_conv</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>M2SCI function</center>
    <div align="right">Last update : 15/06/2004</div>
    <p>
      <b>mtlb_conv</b> - Matlab conv emulation function</p>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>Matlab <tt>
        <b>conv</b>
      </tt> and Scilab <tt>
        <b>convol</b>
      </tt> behave differently in some particular cases:</p>
    <dl>
      <dd>
        <b></b>
        <dd>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        With column vector inputs: if at least input is a column vector Matlab <tt>
              <b>conv</b>
            </tt> returns a column
	vector but Scilab <tt>
              <b>convol</b>
            </tt> always returns a row vector.
        </li>
        </dd>
      </dd>
    </dl>
    <p>
    The function <tt>
        <b>mtlb_conv(u,v)</b>
      </tt> is used by
    <tt>
        <b>mfile2sci</b>
      </tt> to replace <tt>
        <b>conv(u,v)</b>
      </tt> when it was not
    possible to know what were the inputs while porting Matlab code to Scilab. This function will
    determine the correct semantic at run time. If you want to have a
    more efficient code it is possible to replace <tt>
        <b>mtlb_conv</b>
      </tt> calls:
    </p>
    <dl>
      <dd>
        <b></b>
        <dd>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        If <tt>
              <b>u</b>
            </tt> and <tt>
              <b>v</b>
            </tt> are row vectors,
        <tt>
              <b>mtlb_conv(u,v)</b>
            </tt> may be replaced by <tt>
              <b>convol(u,v)</b>
            </tt>
          </li>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        If <tt>
              <b>u</b>
            </tt> or <tt>
              <b>v</b>
            </tt> is a column vector,
        <tt>
              <b>mtlb_conv(u,v)</b>
            </tt> may be replaced by <tt>
              <b>convol(u,v).'</b>
            </tt>
          </li>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        If <tt>
              <b>u</b>
            </tt> and <tt>
              <b>v</b>
            </tt> are column vectors,
        <tt>
              <b>mtlb_conv(u,v)</b>
            </tt> may be replaced by <tt>
              <b>convol(u,v).'</b>
            </tt>
          </li>
        </dd>
      </dd>
    </dl>
    <p>Scilab <tt>
        <b>convol</b>
      </tt> sometimes returns values that may be rounded using <tt>
        <b>clean</b>
      </tt>
    to have a closer result from Matlab one.</p>
    <p>Caution: <tt>
        <b>mtlb_conv</b>
      </tt> has not to be used for hand coded functions.</p>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="../polynomials/clean.htm">
        <tt>
          <b>clean</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Authors</font>
    </h3>
    <dl>
      <dd>
        <b></b>V.C.</dd>
    </dl>
  </body>
</html>
